﻿/**	signal.h
 *	----	Create Time Stamp	--2005-11-01 01:01:35--
 *-----------------------------------------------------------------------------
 *	Mean	:常规事件
 *	Author	:Nick Shallery	(nicknide@gmail.com)
 *	Version	:1.0.18.27	(2009-09-20 23:34:34)
 *-----------------------------------------------------------------------------
**/	/*YOU HAVE ALL LEFT WITH THIS CODE WHILE YOU KEEP COMMENT IN EVERY COPY.*/


#if			!defined(__LOLIX__LOLI__SIGNAL__H__K_IN_G__)
#define		__LOLIX__LOLI__SIGNAL__H__K_IN_G__

#if			!defined(__LOLIX__LOLI_X_MACRO__K_IN_G__)
	#include	"../lolix_macro.h"
#endif	//	!defined(__LOLIX__LOLI_X_MACRO__K_IN_G__)
#if			!defined(__LOLIX__TOY__REBIND_TYPE__K_IN_G__)
	#include	"../toy/rebind_type.hpp"
#endif	//	!defined(__LOLIX__TOY__REBIND_TYPE__K_IN_G__)
#if			!defined(__LOLIX__LOLIX_TYPE__K_IN_G__)
	#include	"../lolix_type.h"
#endif	//	!defined(__LOLIX__LOLIX_TYPE__K_IN_G__)

namespace lolix{namespace loli{
	class	signal;
}}

namespace lolix{namespace toy{
	class time_span;
}}


class LOLIX_NO_VTABLE lolix::loli::signal
	: public itf
{
public:
	LOLIX_DEFINE_FACTORY((0xe5abe49b, 0xb7864ed2, 0x9407ce86, 0xf56fa0f2), (signal**, bool manual_clr));
	LOLIX_DECLARE_ITF(lolix::loli::signal, lolix::itf, (0x55869ce7, 0x5cd34fb8, 0xb4a5942b, 0xda0ea122));
	//===========================================================================
	//	等待事件激活
	//---------------------------------------------------------------------------
	//	ms_t	[i ]: 等待事件最长的超时时间
	//---------------------------------------------------------------------------
	//	lolix::LOLIX_RETNV_OK			: 成功等待事件的返回
	//	lolix::LOLIX_INFO_WAIT_TIMEOUT	: 等待事件超时返回
	//	lolix::LOLIX_ERROR_WAIT_LOST	: 等待事件失败
	//===========================================================================
	LOLIX_INTERFACE(wait,	LOLIX_RETNV,	(const toy::time_span* ms_t));
	LOLIX_INTERFACE(set,	LOLIX_RETNV,	(void));
	LOLIX_INTERFACE(clr,	LOLIX_RETNV,	(void));
};

SYS_REGIST_TYPE(lolix::loli::signal);
SYS_REGIST_TYPE(lolix::loli::signal::factory_type);

#endif	//	!defined(__LOLIX__LOLI__SIGNAL__H__K_IN_G__)


